package com.deercrowing.takeaway.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.deercrowing.takeaway.entity.EmployeesEntity;
import com.deercrowing.takeaway.vo.EmployeeEditPasswordVO;
import com.deercrowing.takeaway.vo.EmployeesPageVO;
import com.deercrowing.takeaway.vo.EmployeesVO;

/**
 * 员工信息(Employees)表服务接口
 *
 * @author guoyongxiang
 * @since 2024-07-05 17:29:12
 */
public interface EmployeesService extends IService<EmployeesEntity> {

    /**
     * 登录业务
     * @param employeesVO
     * @return
     */
    EmployeesVO login(EmployeesVO employeesVO);

    /**
     * 对比用户名是否重复
     * @param employeesVO
     */
    void compareByContext(EmployeesVO employeesVO, Integer isAddOrUpdate /*1、新增 2、更新*/);

    /**
     * 更新存在的员工状态
     * @param status
     * @param id
     */
    void employeeStatusUpdate(Short status, Integer id);

    /**
     * 按条件搜索内容
     * @param employeePageVO
     * @return
     */
    IPage<EmployeesVO> searchByCondition(EmployeesPageVO employeePageVO);

    /**
     * 根据ID查询实体类
     * @param id
     * @return
     */
    EmployeesVO selectById(Long id);

    /**
     * 修改信息至数据库
     *
     * @param id
     * @param employeesVO
     */
    void updateInfoToDB(Long id, EmployeesVO employeesVO);

    /**
     * 新增数据
     *
     * @param employeesVO
     */
    void insertInfoToDB(EmployeesVO employeesVO);

    /**
     * 修改密码
     *
     * @param employeeEditPasswordVO
     */
    void changePassword(EmployeeEditPasswordVO employeeEditPasswordVO);
}

